Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply clippy suggestion #278

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

schneems
Copy link
Contributor

@schneems schneems commented May 1, 2024

CI started failing when a new rust was released with new clippy suggestions. This is failing on main:

error: initializer for `thread_local` value can be made `const`
  --> commons/src/output/warn_later.rs:11:65
   |
11 | thread_local!(static WARN_LATER: RefCell<Option<Vec<String>>> = RefCell::new(None));
   |                                                                 ^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(None) }`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#thread_local_initializer_can_be_made_const
   = note: `-D clippy::thread-local-initializer-can-be-made-const` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::thread_local_initializer_can_be_made_const)]`

error: could not compile `commons` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `commons` (lib test) due to 1 previous error

CI started failing when a new rust was released with new clippy suggestions. This is failing on main:

```
error: initializer for `thread_local` value can be made `const`
  --> commons/src/output/warn_later.rs:11:65
   |
11 | thread_local!(static WARN_LATER: RefCell<Option<Vec<String>>> = RefCell::new(None));
   |                                                                 ^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(None) }`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#thread_local_initializer_can_be_made_const
   = note: `-D clippy::thread-local-initializer-can-be-made-const` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::thread_local_initializer_can_be_made_const)]`

error: could not compile `commons` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `commons` (lib test) due to 1 previous error
```
@schneems schneems marked this pull request as ready for review May 1, 2024 20:50
@schneems schneems requested a review from a team as a code owner May 1, 2024 20:50
@schneems schneems merged commit 6940522 into main May 3, 2024
6 of 7 checks passed
@schneems schneems deleted the schneems/fix-rustup-lint-may-1-2024 branch May 3, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants